const getImage = function (canvas, img) {
  const c = canvas

  c.width = img.width
  c.height = img.height

  let rect = canvas.getBoundingClientRect()
  const ctx = canvas.getContext('2d')
  //ctx.drawImage(img, 0, 0, rect.width, rect.height)

  return ctx.getImageData(0, 0, rect.width, rect.height)
}

export default getImage
